<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 4/10/17
 * Time: 11:28 AM
 */

namespace common\components\bank;

use yii\base\Component;
use yii\base\ErrorException;

/**
 * Class Bank
 * @package common\components\bank
 * @property \common\models\BankGuaranteeCompanyBind $instance; 银行数据实例
 */
abstract class Bank extends Component
{
	const EVENT_BEFORE_CREDIT_SEND = 'event_before_credit_send';
	const EVENT_AFTER_CREDIT_SEND = 'event_after_credit_send';
	
	public $instance;
	
	protected function checkInstance()
	{
		if (!$this->instance){
			throw new ErrorException('没有找到银行实例', 1043);
		}
	}
}